package tech.aistar.service;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import tech.aistar.entity.ExaInfo;


import java.sql.Time;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:spring/spring-*.xml"})
public class testExaInfo {

    @Autowired
    public IExaInfoService exaInfoService;

    @Test
    public void testinsertExaInfo(){
        Date date = new Date();
        SimpleDateFormat day = new SimpleDateFormat("yyyy-MM-dd ");
        SimpleDateFormat time = new SimpleDateFormat("HH:mm:ss");



        try {
            Date day1 = day.parse(day.format(date));
        } catch (ParseException e) {
            e.printStackTrace();
        }

        Date day1 = null;
        try {
            Date tim = time.parse(time.format(date));
        } catch (ParseException e) {
            e.printStackTrace();
        }


//        ExaInfo exaInfo = new ExaInfo(1L,100,tim,time1,day1);

    }

}
